package guzb.cnblogs.classloader;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.Map;

/**
 * ClasspathJarLoader
 *
 * @author 顾志兵
 * @mail ipiger@163.com
 * @since 2024-05-18
 */
public class ClasspathJarLoader extends URLClassLoader{

    /**
     * 类路径下 jar 文件的全文件名，包含相对路径。
     * 如：/third-lib/xxx.jar
     */
    private String jarPath;

    public ClasspathJarLoader(String jarPath) throws MalformedURLException {
        super(new URL[]{ClasspathJarLoader.class.getResource(jarPath)});
    }

}
